//
//  HWCashDrawModel.m
//  嗨文
//
//  Created by 响当当 on 4/28/19.
//  Copyright © 2019 dongzheng. All rights reserved.
//

#import "HWCashDrawModel.h"

@implementation HWCashDrawModel
- (id)initWithDic:(NSDictionary *)dic
{
    if (self = [super init])
    {
        self.agentLevelArr = IFNULL(dic[@"agentLevel"], [NSArray array]);
        self.alipayAccount = [[NSString stringWithFormat:@"%@",dic[@"alipayAccount"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"alipayAccount"]] :@"";
        self.area = [[NSString stringWithFormat:@"%@",dic[@"area"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"area"]] :@"";
        self.automaticDeduction = [[NSString stringWithFormat:@"%@",dic[@"automaticDeduction"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"automaticDeduction"]] :@"";
        self.canWithdrawCash = [[NSString stringWithFormat:@"%@",dic[@"canWithdrawCash"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"canWithdrawCash"]] :@"";
        self.gender = [[NSString stringWithFormat:@"%@",dic[@"gender"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"gender"]] :@"";
        self.hasWithdrawedCash = IFNULL(dic[@"hasWithdrawedCash"],[NSNumber numberWithInteger:0]);
        self.phoneNum = [[NSString stringWithFormat:@"%@",dic[@"phoneNum"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"phoneNum"]] :@"";
        self.realName = [[NSString stringWithFormat:@"%@",dic[@"realName"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"realName"]] :@"";
        self.userId = [[NSString stringWithFormat:@"%@",dic[@"userId"]] isValidString] ? [NSString stringWithFormat:@"%@",dic[@"userId"]] :@"";

    }
    return self;
}
@end
